package cn.jhc.service.impl;

import cn.jhc.dao.OrderDAO;
import cn.jhc.entity.Order;
import cn.jhc.service.OrderService;

import java.util.List;

public class OrderServiceImpl implements OrderService {
    private OrderDAO orderDAO;

    public OrderDAO getOrderDAO() {
        return orderDAO;
    }

    public void setOrderDAO(OrderDAO orderDAO) {
        this.orderDAO = orderDAO;
    }


    @Override
    public int save(Order order) {
        return orderDAO.save(order);
    }

    @Override
    public int update(Order order) {
        return orderDAO.update(order);
    }

    @Override
    public int delete(Integer orderId) {
        return orderDAO.delete(orderId);
    }

    @Override
    public Order queryOne(Integer orderId) {
        return orderDAO.queryOne(orderId);
    }

    @Override
    public List<Order> query(Order order) {
        return orderDAO.query(order);
    }

    @Override
    public List<Order> QueryByUser(Integer userId) {
        return orderDAO.QueryByUser(userId);
    }
}
